package tj.eskhata.pos.domain;

// Generated 06.07.2010 15:48:41 by Hibernate Tools 3.3.0.GA

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * ClPart generated by hbm2java
 */
@Entity
@Table(name = "CL_PART", schema = "MTA")
public class ClPart implements DomainObject {

	private Long id;
	private Region region;
	private Bank bank;
	private Long bankId;
	private Town town;
	private String code;
	private String name;
	private Long statusId;
	private Long accArrId;
	private Date opDate;
	private Long jourOpDaysArr;
	private Set<ClPoint> clPoints = new HashSet<ClPoint>(0);
	
	public ClPart() {
	}

	public ClPart(Long id) {
		this.id = id;
	}

	public ClPart(Long id, Region region, Bank bank, Town town,
			String code, String name, Long statusId, Long accArrId,
			Date opDate, Long jourOpDaysArr, Set<ClPoint> clPoints) {
		this.id = id;
		this.region = region;
		this.bank = bank;
		this.town = town;
		this.code = code;
		this.name = name;
		this.statusId = statusId;
		this.accArrId = accArrId;
		this.opDate = opDate;
		this.jourOpDaysArr = jourOpDaysArr;
		this.clPoints = clPoints;		
	}

	@Id
	@Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "REGION_ID")
	public Region getRegion() {
		return this.region;
	}

	public void setRegion(Region region) {
		this.region = region;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "BANK_ID")
	public Bank getBank() {
		return this.bank;
	}

	public void setBank(Bank bank) {
		this.bank = bank;
	}
	
	@Column(name = "BANK_ID", precision = 22, scale = 0, insertable=false,updatable=false)	
	public Long getBankId() {
		return this.bankId;
	}

	public void setBankId(Long bankId) {
		this.bankId = bankId;
	}

	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TOWN_ID")
	public Town getTown() {
		return this.town;
	}

	public void setTown(Town town) {
		this.town = town;
	}

	@Column(name = "CODE", length = 20)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "NAME", length = 64)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "STATUS_ID", precision = 22, scale = 0)
	public Long getStatusId() {
		return this.statusId;
	}

	public void setStatusId(Long statusId) {
		this.statusId = statusId;
	}

	@Column(name = "ACC_ARR_ID", precision = 22, scale = 0)
	public Long getAccArrId() {
		return this.accArrId;
	}

	public void setAccArrId(Long accArrId) {
		this.accArrId = accArrId;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "OP_DATE", length = 7)
	public Date getOpDate() {
		return this.opDate;
	}

	public void setOpDate(Date opDate) {
		this.opDate = opDate;
	}

	@Column(name = "JOUR_OP_DAYS_ARR", precision = 22, scale = 0)
	public Long getJourOpDaysArr() {
		return this.jourOpDaysArr;
	}

	public void setJourOpDaysArr(Long jourOpDaysArr) {
		this.jourOpDaysArr = jourOpDaysArr;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "clPart")
	public Set<ClPoint> getClPoints() {
		return this.clPoints;
	}

	public void setClPoints(Set<ClPoint> clPoints) {
		this.clPoints = clPoints;
	}

}
